<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<ui:composition template="/pages/protected/user/default.xhtml">
		<ui:define name="content">
			<h3>#{msgs.registerHeader}</h3>

			<h:form id="register">
				<h:panelGrid columns="3">

					<h:outputLabel value="#{msgs.loginUserName} " />
					<h:inputText id="username" value="#{userMB.user.username}"
						required="true" requiredMessage="#{msgs.usernameRequired}" />
					<h:message for="username" errorStyle="background: #FF0000;" />

					<h:outputLabel value="#{msgs.Name} " />
					<h:inputText id="name" value="#{userMB.user.name}"
						required="true" requiredMessage="#{msgs.nameRequired}" />
					<h:message for="name" errorStyle="background: #FF0000;" />

					<h:outputLabel value="#{msgs.loginPassword} " />
					<h:inputSecret id="password"
						value="#{userMB.user.password}" required="true"
						requiredMessage="#{msgs.passwordRequired}" />
					<h:message for="password" errorStyle="background: #FF0000;" />
					
					<h:outputLabel value="#{msgs.loginPasswordConfirm} " />
					<h:inputSecret id="passwordconfirm" required="true"
						requiredMessage="#{msgs.passwordConfirmationRequired}" />
					<h:message for="passwordconfirm" errorStyle="background: #FF0000;" />
					
					<h:outputLabel value="#{msgs.enterCaptcha} " />
					<p:captcha id="captcha" label="Captcha"/> 
					<h:message for="captcha" errorStyle="background: #FF0000;" />

					
					<h:link  outcome="logout" value="#{msgs.cancel}"
						immediate="true" />
					<h:commandButton action="#{userMB.registerUser()}"
						value="#{msgs.create}"  ajax="false"/>
				</h:panelGrid>
				<br />
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>